3.3.7 \(\int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^3} \, dx\) [207]

3.3.7.1 Optimal result
3.3.7.2 Mathematica [C] (warning: unable to verify)
3.3.7.3 Rubi [A] (verified)
3.3.7.4 Maple [A] (verified)
3.3.7.5 Fricas [B] (verification not implemented)
3.3.7.6 Sympy [F]
3.3.7.7 Maxima [F(-2)]
3.3.7.8 Giac [B] (verification not implemented)
3.3.7.9 Mupad [B] (verification not implemented)

3.3.7.1 Optimal result

Integrand size = 31, antiderivative size = 188 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^3} \, dx=\frac {a^3 \text {arctanh}(\sin (e+f x))}{d^3 f}-\frac {a^3 \sqrt {c-d} \left (2 c^2+6 c d+7 d^2\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{d^3 (c+d)^{5/2} f}-\frac {(c-d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{2 d (c+d) f (c+d \sec (e+f x))^2}-\frac {a^3 (c-d) (2 c+5 d) \tan (e+f x)}{2 d^2 (c+d)^2 f (c+d \sec (e+f x))} \]

output
a^3*arctanh(sin(f*x+e))/d^3/f-a^3*(2*c^2+6*c*d+7*d^2)*arctanh((c-d)^(1/2)* 
tan(1/2*f*x+1/2*e)/(c+d)^(1/2))*(c-d)^(1/2)/d^3/(c+d)^(5/2)/f-1/2*(c-d)*(a 
^3+a^3*sec(f*x+e))*tan(f*x+e)/d/(c+d)/f/(c+d*sec(f*x+e))^2-1/2*a^3*(c-d)*( 
2*c+5*d)*tan(f*x+e)/d^2/(c+d)^2/f/(c+d*sec(f*x+e))
 
3.3.7.2 Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 4.33 (sec) , antiderivative size = 393, normalized size of antiderivative = 2.09 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^3} \, dx=\frac {a^3 (d+c \cos (e+f x)) \sec ^6\left (\frac {1}{2} (e+f x)\right ) (1+\sec (e+f x))^3 \left (-4 (d+c \cos (e+f x))^2 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+4 (d+c \cos (e+f x))^2 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+\frac {4 \left (2 c^3+4 c^2 d+c d^2-7 d^3\right ) \arctan \left (\frac {(i \cos (e)+\sin (e)) \left (c \sin (e)+(-d+c \cos (e)) \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}\right ) (d+c \cos (e+f x))^2 (i \cos (e)+\sin (e))}{(c+d)^2 \sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {(c-d) d \sec (e) \left (\left (2 c^4+6 c^3 d+5 c^2 d^2+12 c d^3+2 d^4\right ) \sin (e)-c \left (d \left (7 c^2+18 c d+2 d^2\right ) \sin (f x)-d \left (c^2+6 c d+2 d^2\right ) \sin (2 e+f x)+c \left (2 c^2+6 c d+d^2\right ) \sin (e+2 f x)\right )\right )}{c^2 (c+d)^2}\right )}{32 d^3 f (c+d \sec (e+f x))^3} \]

input
Integrate[(Sec[e + f*x]*(a + a*Sec[e + f*x])^3)/(c + d*Sec[e + f*x])^3,x]
 
output
(a^3*(d + c*Cos[e + f*x])*Sec[(e + f*x)/2]^6*(1 + Sec[e + f*x])^3*(-4*(d + 
 c*Cos[e + f*x])^2*Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]] + 4*(d + c*Cos 
[e + f*x])^2*Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]] + (4*(2*c^3 + 4*c^2* 
d + c*d^2 - 7*d^3)*ArcTan[((I*Cos[e] + Sin[e])*(c*Sin[e] + (-d + c*Cos[e]) 
*Tan[(f*x)/2]))/(Sqrt[c^2 - d^2]*Sqrt[(Cos[e] - I*Sin[e])^2])]*(d + c*Cos[ 
e + f*x])^2*(I*Cos[e] + Sin[e]))/((c + d)^2*Sqrt[c^2 - d^2]*Sqrt[(Cos[e] - 
 I*Sin[e])^2]) + ((c - d)*d*Sec[e]*((2*c^4 + 6*c^3*d + 5*c^2*d^2 + 12*c*d^ 
3 + 2*d^4)*Sin[e] - c*(d*(7*c^2 + 18*c*d + 2*d^2)*Sin[f*x] - d*(c^2 + 6*c* 
d + 2*d^2)*Sin[2*e + f*x] + c*(2*c^2 + 6*c*d + d^2)*Sin[e + 2*f*x])))/(c^2 
*(c + d)^2)))/(32*d^3*f*(c + d*Sec[e + f*x])^3)
 
3.3.7.3 Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 330, normalized size of antiderivative = 1.76, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.355, Rules used = {3042, 4475, 109, 27, 166, 25, 27, 175, 45, 104, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec (e+f x) (a \sec (e+f x)+a)^3}{(c+d \sec (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^3}{\left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3}dx\)

\(\Big \downarrow \) 4475

\(\displaystyle -\frac {a^2 \tan (e+f x) \int \frac {(\sec (e+f x) a+a)^{5/2}}{\sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 109

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {\int \frac {a^3 \sqrt {\sec (e+f x) a+a} (c-5 d-2 (c+d) \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}d\sec (e+f x)}{2 a d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {a^2 \int \frac {\sqrt {\sec (e+f x) a+a} (c-5 d-2 (c+d) \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}d\sec (e+f x)}{2 d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 166

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {a^2 \left (\frac {\int -\frac {a^2 \left (2 \sec (e+f x) (c+d)^2+d (c+7 d)\right )}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{a d (c+d)}-\frac {(c-d) (2 c+5 d) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d (c+d) (c+d \sec (e+f x))}\right )}{2 d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {a^2 \left (-\frac {\int \frac {a^2 \left (2 \sec (e+f x) (c+d)^2+d (c+7 d)\right )}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{a d (c+d)}-\frac {(c-d) (2 c+5 d) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d (c+d) (c+d \sec (e+f x))}\right )}{2 d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {a^2 \left (-\frac {a \int \frac {2 \sec (e+f x) (c+d)^2+d (c+7 d)}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{d (c+d)}-\frac {(c-d) (2 c+5 d) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d (c+d) (c+d \sec (e+f x))}\right )}{2 d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 175

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {a^2 \left (-\frac {a \left (\frac {2 (c+d)^2 \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{d}-\frac {\left (2 c (c+d)^2-d^2 (c+7 d)\right ) \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{d}\right )}{d (c+d)}-\frac {(c-d) (2 c+5 d) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d (c+d) (c+d \sec (e+f x))}\right )}{2 d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 45

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {a^2 \left (-\frac {a \left (\frac {4 (c+d)^2 \int \frac {1}{-\frac {(a-a \sec (e+f x)) a}{\sec (e+f x) a+a}-a}d\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {\sec (e+f x) a+a}}}{d}-\frac {\left (2 c (c+d)^2-d^2 (c+7 d)\right ) \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{d}\right )}{d (c+d)}-\frac {(c-d) (2 c+5 d) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d (c+d) (c+d \sec (e+f x))}\right )}{2 d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 104

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {a^2 \left (-\frac {a \left (\frac {4 (c+d)^2 \int \frac {1}{-\frac {(a-a \sec (e+f x)) a}{\sec (e+f x) a+a}-a}d\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {\sec (e+f x) a+a}}}{d}-\frac {2 \left (2 c (c+d)^2-d^2 (c+7 d)\right ) \int \frac {1}{a (c-d)+\frac {a (c+d) (\sec (e+f x) a+a)}{a-a \sec (e+f x)}}d\frac {\sqrt {\sec (e+f x) a+a}}{\sqrt {a-a \sec (e+f x)}}}{d}\right )}{d (c+d)}-\frac {(c-d) (2 c+5 d) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d (c+d) (c+d \sec (e+f x))}\right )}{2 d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 218

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 d (c+d) (c+d \sec (e+f x))^2}-\frac {a^2 \left (-\frac {a \left (-\frac {2 \left (2 c (c+d)^2-d^2 (c+7 d)\right ) \arctan \left (\frac {\sqrt {c+d} \sqrt {a \sec (e+f x)+a}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right )}{a d \sqrt {c-d} \sqrt {c+d}}-\frac {4 (c+d)^2 \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a \sec (e+f x)+a}}\right )}{a d}\right )}{d (c+d)}-\frac {(c-d) (2 c+5 d) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d (c+d) (c+d \sec (e+f x))}\right )}{2 d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

input
Int[(Sec[e + f*x]*(a + a*Sec[e + f*x])^3)/(c + d*Sec[e + f*x])^3,x]
 
output
-((a^2*(((c - d)*Sqrt[a - a*Sec[e + f*x]]*(a + a*Sec[e + f*x])^(3/2))/(2*d 
*(c + d)*(c + d*Sec[e + f*x])^2) - (a^2*(-((a*((-4*(c + d)^2*ArcTan[Sqrt[a 
 - a*Sec[e + f*x]]/Sqrt[a + a*Sec[e + f*x]]])/(a*d) - (2*(2*c*(c + d)^2 - 
d^2*(c + 7*d))*ArcTan[(Sqrt[c + d]*Sqrt[a + a*Sec[e + f*x]])/(Sqrt[c - d]* 
Sqrt[a - a*Sec[e + f*x]])])/(a*Sqrt[c - d]*d*Sqrt[c + d])))/(d*(c + d))) - 
 ((c - d)*(2*c + 5*d)*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]])/( 
a*d*(c + d)*(c + d*Sec[e + f*x]))))/(2*d*(c + d)))*Tan[e + f*x])/(f*Sqrt[a 
 - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]))
 

3.3.7.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 104
Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x 
_)), x_] :> With[{q = Denominator[m]}, Simp[q   Subst[Int[x^(q*(m + 1) - 1) 
/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^(1/q)], x] 
] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && L 
tQ[-1, m, 0] && SimplerQ[a + b*x, c + d*x]
 

rule 109
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[(b*c - a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*((e + f 
*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] + Simp[1/(b*(b*e - a*f)*(m + 1)) 
 Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) 
+ c*f*(p + 1)) + b*c*(d*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) 
 + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /; FreeQ[{a, b, c, 
d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || 
IntegersQ[m, n + p] || IntegersQ[p, m + n])
 

rule 166
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[(b*g - a*h)*(a + b*x)^(m + 1)*(c + 
 d*x)^n*((e + f*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] - Simp[1/(b*(b*e - 
a*f)*(m + 1))   Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p*Simp[b* 
c*(f*g - e*h)*(m + 1) + (b*g - a*h)*(d*e*n + c*f*(p + 1)) + d*(b*(f*g - e*h 
)*(m + 1) + f*(b*g - a*h)*(n + p + 1))*x, x], x], x] /; FreeQ[{a, b, c, d, 
e, f, g, h, p}, x] && ILtQ[m, -1] && GtQ[n, 0]
 

rule 175
Int[(((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_ 
)))/((a_.) + (b_.)*(x_)), x_] :> Simp[h/b   Int[(c + d*x)^n*(e + f*x)^p, x] 
, x] + Simp[(b*g - a*h)/b   Int[(c + d*x)^n*((e + f*x)^p/(a + b*x)), x], x] 
 /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4475
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[a 
^2*g*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) 
 Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*((c + d*x)^n/Sqrt[a - b*x]), x 
], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[ 
b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p, 1] || In 
tegerQ[m - 1/2])
 
3.3.7.4 Maple [A] (verified)

Time = 1.07 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.21

method result size
derivativedivides \(\frac {16 a^{3} \left (\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{16 d^{3}}+\frac {\left (c -d \right ) \left (\frac {\frac {d \left (2 c^{2}+3 c d -5 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 c^{2}+4 c d +2 d^{2}}-\frac {d \left (2 c +7 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c +d \right )}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{2}}-\frac {\left (2 c^{2}+6 c d +7 d^{2}\right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c^{2}+2 c d +d^{2}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{8 d^{3}}-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{16 d^{3}}\right )}{f}\) \(227\)
default \(\frac {16 a^{3} \left (\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{16 d^{3}}+\frac {\left (c -d \right ) \left (\frac {\frac {d \left (2 c^{2}+3 c d -5 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 c^{2}+4 c d +2 d^{2}}-\frac {d \left (2 c +7 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c +d \right )}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{2}}-\frac {\left (2 c^{2}+6 c d +7 d^{2}\right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c^{2}+2 c d +d^{2}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{8 d^{3}}-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{16 d^{3}}\right )}{f}\) \(227\)
risch \(\frac {i a^{3} \left (-c^{4} d \,{\mathrm e}^{3 i \left (f x +e \right )}-5 c^{3} d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+4 c^{2} d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+2 c \,d^{4} {\mathrm e}^{3 i \left (f x +e \right )}-2 c^{5} {\mathrm e}^{2 i \left (f x +e \right )}-4 c^{4} d \,{\mathrm e}^{2 i \left (f x +e \right )}+c^{3} d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-7 c^{2} d^{3} {\mathrm e}^{2 i \left (f x +e \right )}+10 c \,d^{4} {\mathrm e}^{2 i \left (f x +e \right )}+2 d^{5} {\mathrm e}^{2 i \left (f x +e \right )}-7 c^{4} d \,{\mathrm e}^{i \left (f x +e \right )}-11 c^{3} d^{2} {\mathrm e}^{i \left (f x +e \right )}+16 c^{2} d^{3} {\mathrm e}^{i \left (f x +e \right )}+2 c \,d^{4} {\mathrm e}^{i \left (f x +e \right )}-2 c^{5}-4 c^{4} d +5 c^{3} d^{2}+c^{2} d^{3}\right )}{c^{2} d^{2} \left (c +d \right )^{2} f \left ({\mathrm e}^{2 i \left (f x +e \right )} c +2 d \,{\mathrm e}^{i \left (f x +e \right )}+c \right )^{2}}+\frac {\sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}-d}{c}\right ) c^{2}}{\left (c +d \right )^{3} f \,d^{3}}+\frac {3 \sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}-d}{c}\right ) c}{\left (c +d \right )^{3} f \,d^{2}}+\frac {7 \sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}-d}{c}\right )}{2 \left (c +d \right )^{3} f d}-\frac {\sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}+d}{c}\right ) c^{2}}{\left (c +d \right )^{3} f \,d^{3}}-\frac {3 \sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}+d}{c}\right ) c}{\left (c +d \right )^{3} f \,d^{2}}-\frac {7 \sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}+d}{c}\right )}{2 \left (c +d \right )^{3} f d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{d^{3} f}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{d^{3} f}\) \(706\)

input
int(sec(f*x+e)*(a+a*sec(f*x+e))^3/(c+d*sec(f*x+e))^3,x,method=_RETURNVERBO 
SE)
 
output
16/f*a^3*(1/16/d^3*ln(tan(1/2*f*x+1/2*e)+1)+1/8*(c-d)/d^3*((1/2*d*(2*c^2+3 
*c*d-5*d^2)/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3-1/2*d*(2*c+7*d)/(c+d)*tan 
(1/2*f*x+1/2*e))/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2-1/2 
*(2*c^2+6*c*d+7*d^2)/(c^2+2*c*d+d^2)/((c+d)*(c-d))^(1/2)*arctanh((c-d)*tan 
(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2)))-1/16/d^3*ln(tan(1/2*f*x+1/2*e)-1))
 
3.3.7.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 552 vs. \(2 (175) = 350\).

Time = 0.60 (sec) , antiderivative size = 1176, normalized size of antiderivative = 6.26 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^3} \, dx=\text {Too large to display} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3/(c+d*sec(f*x+e))^3,x, algorithm="f 
ricas")
 
output
[1/4*((2*a^3*c^2*d^2 + 6*a^3*c*d^3 + 7*a^3*d^4 + (2*a^3*c^4 + 6*a^3*c^3*d 
+ 7*a^3*c^2*d^2)*cos(f*x + e)^2 + 2*(2*a^3*c^3*d + 6*a^3*c^2*d^2 + 7*a^3*c 
*d^3)*cos(f*x + e))*sqrt((c - d)/(c + d))*log((2*c*d*cos(f*x + e) - (c^2 - 
 2*d^2)*cos(f*x + e)^2 - 2*(c^2 + c*d + (c*d + d^2)*cos(f*x + e))*sqrt((c 
- d)/(c + d))*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*d*cos( 
f*x + e) + d^2)) + 2*(a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d^4 + (a^3*c^4 + 2*a 
^3*c^3*d + a^3*c^2*d^2)*cos(f*x + e)^2 + 2*(a^3*c^3*d + 2*a^3*c^2*d^2 + a^ 
3*c*d^3)*cos(f*x + e))*log(sin(f*x + e) + 1) - 2*(a^3*c^2*d^2 + 2*a^3*c*d^ 
3 + a^3*d^4 + (a^3*c^4 + 2*a^3*c^3*d + a^3*c^2*d^2)*cos(f*x + e)^2 + 2*(a^ 
3*c^3*d + 2*a^3*c^2*d^2 + a^3*c*d^3)*cos(f*x + e))*log(-sin(f*x + e) + 1) 
- 2*(3*a^3*c^2*d^2 + 3*a^3*c*d^3 - 6*a^3*d^4 + (2*a^3*c^3*d + 4*a^3*c^2*d^ 
2 - 5*a^3*c*d^3 - a^3*d^4)*cos(f*x + e))*sin(f*x + e))/((c^4*d^3 + 2*c^3*d 
^4 + c^2*d^5)*f*cos(f*x + e)^2 + 2*(c^3*d^4 + 2*c^2*d^5 + c*d^6)*f*cos(f*x 
 + e) + (c^2*d^5 + 2*c*d^6 + d^7)*f), -1/2*((2*a^3*c^2*d^2 + 6*a^3*c*d^3 + 
 7*a^3*d^4 + (2*a^3*c^4 + 6*a^3*c^3*d + 7*a^3*c^2*d^2)*cos(f*x + e)^2 + 2* 
(2*a^3*c^3*d + 6*a^3*c^2*d^2 + 7*a^3*c*d^3)*cos(f*x + e))*sqrt(-(c - d)/(c 
 + d))*arctan(-(d*cos(f*x + e) + c)*sqrt(-(c - d)/(c + d))/((c - d)*sin(f* 
x + e))) - (a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d^4 + (a^3*c^4 + 2*a^3*c^3*d + 
 a^3*c^2*d^2)*cos(f*x + e)^2 + 2*(a^3*c^3*d + 2*a^3*c^2*d^2 + a^3*c*d^3)*c 
os(f*x + e))*log(sin(f*x + e) + 1) + (a^3*c^2*d^2 + 2*a^3*c*d^3 + a^3*d...
 
3.3.7.6 Sympy [F]

\[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^3} \, dx=a^{3} \left (\int \frac {\sec {\left (e + f x \right )}}{c^{3} + 3 c^{2} d \sec {\left (e + f x \right )} + 3 c d^{2} \sec ^{2}{\left (e + f x \right )} + d^{3} \sec ^{3}{\left (e + f x \right )}}\, dx + \int \frac {3 \sec ^{2}{\left (e + f x \right )}}{c^{3} + 3 c^{2} d \sec {\left (e + f x \right )} + 3 c d^{2} \sec ^{2}{\left (e + f x \right )} + d^{3} \sec ^{3}{\left (e + f x \right )}}\, dx + \int \frac {3 \sec ^{3}{\left (e + f x \right )}}{c^{3} + 3 c^{2} d \sec {\left (e + f x \right )} + 3 c d^{2} \sec ^{2}{\left (e + f x \right )} + d^{3} \sec ^{3}{\left (e + f x \right )}}\, dx + \int \frac {\sec ^{4}{\left (e + f x \right )}}{c^{3} + 3 c^{2} d \sec {\left (e + f x \right )} + 3 c d^{2} \sec ^{2}{\left (e + f x \right )} + d^{3} \sec ^{3}{\left (e + f x \right )}}\, dx\right ) \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))**3/(c+d*sec(f*x+e))**3,x)
 
output
a**3*(Integral(sec(e + f*x)/(c**3 + 3*c**2*d*sec(e + f*x) + 3*c*d**2*sec(e 
 + f*x)**2 + d**3*sec(e + f*x)**3), x) + Integral(3*sec(e + f*x)**2/(c**3 
+ 3*c**2*d*sec(e + f*x) + 3*c*d**2*sec(e + f*x)**2 + d**3*sec(e + f*x)**3) 
, x) + Integral(3*sec(e + f*x)**3/(c**3 + 3*c**2*d*sec(e + f*x) + 3*c*d**2 
*sec(e + f*x)**2 + d**3*sec(e + f*x)**3), x) + Integral(sec(e + f*x)**4/(c 
**3 + 3*c**2*d*sec(e + f*x) + 3*c*d**2*sec(e + f*x)**2 + d**3*sec(e + f*x) 
**3), x))
 
3.3.7.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^3} \, dx=\text {Exception raised: ValueError} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3/(c+d*sec(f*x+e))^3,x, algorithm="m 
axima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?` f 
or more de
 
3.3.7.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 376 vs. \(2 (175) = 350\).

Time = 0.42 (sec) , antiderivative size = 376, normalized size of antiderivative = 2.00 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^3} \, dx=\frac {\frac {a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{d^{3}} - \frac {a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{d^{3}} + \frac {{\left (2 \, a^{3} c^{3} + 4 \, a^{3} c^{2} d + a^{3} c d^{2} - 7 \, a^{3} d^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, c - 2 \, d\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )}}{{\left (c^{2} d^{3} + 2 \, c d^{4} + d^{5}\right )} \sqrt {-c^{2} + d^{2}}} + \frac {2 \, a^{3} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + a^{3} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 8 \, a^{3} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 5 \, a^{3} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2 \, a^{3} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 7 \, a^{3} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, a^{3} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 7 \, a^{3} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (c^{2} d^{2} + 2 \, c d^{3} + d^{4}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c - d\right )}^{2}}}{f} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3/(c+d*sec(f*x+e))^3,x, algorithm="g 
iac")
 
output
(a^3*log(abs(tan(1/2*f*x + 1/2*e) + 1))/d^3 - a^3*log(abs(tan(1/2*f*x + 1/ 
2*e) - 1))/d^3 + (2*a^3*c^3 + 4*a^3*c^2*d + a^3*c*d^2 - 7*a^3*d^3)*(pi*flo 
or(1/2*(f*x + e)/pi + 1/2)*sgn(2*c - 2*d) + arctan((c*tan(1/2*f*x + 1/2*e) 
 - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((c^2*d^3 + 2*c*d^4 + d^5)*s 
qrt(-c^2 + d^2)) + (2*a^3*c^3*tan(1/2*f*x + 1/2*e)^3 + a^3*c^2*d*tan(1/2*f 
*x + 1/2*e)^3 - 8*a^3*c*d^2*tan(1/2*f*x + 1/2*e)^3 + 5*a^3*d^3*tan(1/2*f*x 
 + 1/2*e)^3 - 2*a^3*c^3*tan(1/2*f*x + 1/2*e) - 7*a^3*c^2*d*tan(1/2*f*x + 1 
/2*e) + 2*a^3*c*d^2*tan(1/2*f*x + 1/2*e) + 7*a^3*d^3*tan(1/2*f*x + 1/2*e)) 
/((c^2*d^2 + 2*c*d^3 + d^4)*(c*tan(1/2*f*x + 1/2*e)^2 - d*tan(1/2*f*x + 1/ 
2*e)^2 - c - d)^2))/f
 
3.3.7.9 Mupad [B] (verification not implemented)

Time = 20.18 (sec) , antiderivative size = 4131, normalized size of antiderivative = 21.97 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^3} \, dx=\text {Too large to display} \]

input
int((a + a/cos(e + f*x))^3/(cos(e + f*x)*(c + d/cos(e + f*x))^3),x)
 
output
- ((a^3*tan(e/2 + (f*x)/2)*(5*c*d + 2*c^2 - 7*d^2))/(d^2*(c + d)) - (a^3*t 
an(e/2 + (f*x)/2)^3*(c^2*d - 8*c*d^2 + 2*c^3 + 5*d^3))/(d^2*(c + d)^2))/(f 
*(2*c*d - tan(e/2 + (f*x)/2)^2*(2*c^2 - 2*d^2) + tan(e/2 + (f*x)/2)^4*(c^2 
 - 2*c*d + d^2) + c^2 + d^2)) - (a^3*atan(((a^3*((8*tan(e/2 + (f*x)/2)*(8* 
a^6*c^7 - 53*a^6*d^7 + 59*a^6*c*d^6 + 16*a^6*c^6*d + 53*a^6*c^2*d^5 - 23*a 
^6*c^3*d^4 - 52*a^6*c^4*d^3 - 8*a^6*c^5*d^2))/(4*c*d^7 + d^8 + 6*c^2*d^6 + 
 4*c^3*d^5 + c^4*d^4) + (a^3*((8*(18*a^3*d^12 + 10*a^3*c*d^11 - 32*a^3*c^2 
*d^10 - 20*a^3*c^3*d^9 + 10*a^3*c^4*d^8 + 10*a^3*c^5*d^7 + 4*a^3*c^6*d^6)) 
/(4*c*d^9 + d^10 + 6*c^2*d^8 + 4*c^3*d^7 + c^4*d^6) - (8*a^3*tan(e/2 + (f* 
x)/2)*(8*c*d^12 + 16*c^2*d^11 - 8*c^3*d^10 - 32*c^4*d^9 - 8*c^5*d^8 + 16*c 
^6*d^7 + 8*c^7*d^6))/(d^3*(4*c*d^7 + d^8 + 6*c^2*d^6 + 4*c^3*d^5 + c^4*d^4 
))))/d^3)*1i)/d^3 + (a^3*((8*tan(e/2 + (f*x)/2)*(8*a^6*c^7 - 53*a^6*d^7 + 
59*a^6*c*d^6 + 16*a^6*c^6*d + 53*a^6*c^2*d^5 - 23*a^6*c^3*d^4 - 52*a^6*c^4 
*d^3 - 8*a^6*c^5*d^2))/(4*c*d^7 + d^8 + 6*c^2*d^6 + 4*c^3*d^5 + c^4*d^4) - 
 (a^3*((8*(18*a^3*d^12 + 10*a^3*c*d^11 - 32*a^3*c^2*d^10 - 20*a^3*c^3*d^9 
+ 10*a^3*c^4*d^8 + 10*a^3*c^5*d^7 + 4*a^3*c^6*d^6))/(4*c*d^9 + d^10 + 6*c^ 
2*d^8 + 4*c^3*d^7 + c^4*d^6) + (8*a^3*tan(e/2 + (f*x)/2)*(8*c*d^12 + 16*c^ 
2*d^11 - 8*c^3*d^10 - 32*c^4*d^9 - 8*c^5*d^8 + 16*c^6*d^7 + 8*c^7*d^6))/(d 
^3*(4*c*d^7 + d^8 + 6*c^2*d^6 + 4*c^3*d^5 + c^4*d^4))))/d^3)*1i)/d^3)/((16 
*(4*a^9*c^6 - 35*a^9*d^6 + 61*a^9*c*d^5 + 10*a^9*c^5*d + 5*a^9*c^2*d^4 ...